package com.youdianstar.app.support


import com.youdianstar.app.api.ApiService
import com.youdianstar.app.ui.*
import com.youdianstar.app.ui.account.LoginViewModel
import com.youdianstar.app.ui.account.PhoneCodeViewModel
import com.youdianstar.app.ui.help.FaqViewModel
import com.youdianstar.app.ui.help.FeedbackViewModel
import com.youdianstar.app.ui.pay.PaymentViewModel
import com.youdianstar.app.ui.pay.WalletViewModel
import com.youdianstar.app.common.HTTP_BRS_URL
import com.youdianstar.app.ui.op.OPMerchantViewModel
import com.youdianstar.app.ui.reward.RewardViewModel
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.dsl.module


/**
 * File: LibApi
 * Author: 82149 Create: 2021/9/28 19:29
 * Changes (from 2021/9/28)
 * --------------------------------------------------
 * description:
 * ---------------------------------------------------
 *
 */

val moduleApi = module {
    single {
        NetworkApi.INSTANCE.getApi(ApiService::class.java, HTTP_BRS_URL)
    }

    single {
        ApiRepository(get())
    }

    viewModel { SplashViewModel(get()) }

    viewModel { LoginViewModel(get()) }

    viewModel { PhoneCodeViewModel(get()) }


    viewModel { MainViewModel(get()) }

    viewModel { BranchViewModel(get()) }

    viewModel { ScanViewModel(get()) }

    viewModel { OrderViewModel(get()) }

    viewModel { ReportViewModel(get()) }

    viewModel { WalletViewModel(get()) }

    viewModel { PaymentViewModel(get()) }

    viewModel { SettingViewModel(get()) }

    viewModel { FaqViewModel(get()) }

    viewModel { FeedbackViewModel(get()) }

    viewModel { RewardViewModel(get()) }

    viewModel { OPMerchantViewModel(get()) }

    viewModel { BusinessJoinViewModel(get()) }
}